package cn.houserent.dao.impl;

import java.util.List;

import cn.houserent.dao.BaseDao;
import cn.houserent.dao.UserDao;
import cn.houserent.entity.Users;

public class UserDaoImpl extends BaseDao implements UserDao{

	@Override
	public void insert(Users user) {
		currentSession().merge(user);
	}

	@Override
	public List<Users> getUsers(Users users) {
		String sql = "from Users where name=:name and password=:password";
		return currentSession().createQuery(sql).setProperties(users).list();
	}
	
}
